<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8">
    <title>Title</title>
</head>
<body>

    <div onclick="GoTop();" style="width: 66px;height: 26px;background-color: black;color: white;position:fixed;bottom: 20px;right: 20px">
        <a href="#" style="color: snow">返回顶部</a>      <!--位于右下角-->
    </div>
    <div style="height: 2000px; background-color: aquamarine;">文章内容</div>


    <script>
        function GoTop() {
            document.body.scrollTop = 0;
        }
    </script>
</body>
</html>